#!/bin/bash - 
#===============================================================================
#
#          FILE: java_iconv.sh
# 
#         USAGE: ./java_iconv.sh 
# 
#   DESCRIPTION: 
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: YOUR NAME (), 
#  ORGANIZATION: 
#       CREATED: 2012年06月22日 00时54分23秒 CST
#      REVISION:  ---
#===============================================================================

#set -o nounset                              # Treat unset variables as an error
#shopt -s -o nounset
if [  "$1" ]; then
    gitCmd=$*
else
	echo 批量在该目录下的所有文件夹执行命令
	echo 例如:$0 clean
	return
fi
workPath=`pwd`
paths=$(ls -l|awk '/^d/ {print $NF}')
for path in $paths
do
	path=$workPath/$path
	cd $path
	echo -e $path
	mvn -T 1C -Dmaven.compile.fork=true $gitCmd
done
